﻿using System.Data;
using Microsoft.Extensions.Configuration;
using MySqlConnector;

namespace Core.Domains.Contexts;

public class DapperDbContext
{
    private IConfiguration _configuration;

    public DapperDbContext(IConfiguration configuration)
    {
        _configuration = configuration;
    }

    public IDbConnection CreateConnection()
    {
        return new MySqlConnection(_configuration.GetConnectionString("DefaultConnection"));
    }
}
